package com.bdqn.zhang.controller;

import com.bdqn.zhang.service.UserService;
import com.bdqn.zhang.util.Global;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: tao
 * @Description: talk is cheap,show me the code!
 * @Date: create in 2020/11/23 10:09
 */

/* 表明所有方法都是异步方法*/
@RestController
public class HelloController {

//    @Resource
//    private Student student;

    @Autowired
    private UserService userService;

    @RequestMapping("/hello")
    public String hello(){
        System.out.println(Global.getName());

        int count = userService.count();

        return String.valueOf(count);
    }
}
